package com.yc.abc.servlet;

import com.yc.tomcat.core.HttpServlet;
import com.yc.tomcat.core.ServletRequest;
import com.yc.tomcat.core.ServletResponse;

public class DemoServlet extends HttpServlet{
	@Override
	public void doGet(ServletRequest request, ServletResponse response) {
		doPost(request, response);
	}

	@Override
	public void doPost(ServletRequest request, ServletResponse response) {
		String name = request.getParameter("name");
		String pwd = request.getParameter("pwd");
		String tel = request.getParameter("tel");
		
		System.out.println(name + "\t" + pwd + "\t" + tel);
		System.out.println("name:" + request.getSession().getAttribute("name"));
		
		response.sendRedirect("register.html");
	}
	
}
